package game.leon.engine.utils;

/**
 * User: bianpeng
 * Date: 11-12-27
 */
public class LinkedNode<T> {
    private T item;
    private LinkedNode<T> next;
    public LinkedNode(T item, LinkedNode<T> next) {
        this.item = item;
        this.next = next;
    }
    public LinkedNode(T item) {
        this(item, null);
    }
    public static <T> LinkedNode<T> cons(T item, LinkedNode<T> list) {
        return new LinkedNode<T>(item, list);
    }
    public T getItem() {
        return item;
    }
    public LinkedNode<T> getNext() {
        return next;
    }
    public void setNext(LinkedNode<T> next) {
        this.next = next;
    }
}
